home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / lib.fmt / c / rexec.man < prev    next >
Encoding:
Text File  |  1991-11-07  |  2.6 KB  |  67 lines

  1.  
  2.  
  3.  
  4. REXEC                 C Library Procedures                  REXEC
  5.  
  6.  
  7.  
  8. NNAAMMEE
  9.      rexec - return stream to a remote command
  10.  
  11. SSYYNNOOPPSSIISS
  12.      rreemm == rreexxeecc((aahhoosstt,, iinnppoorrtt,, uusseerr,, ppaasssswwdd,, ccmmdd,, ffdd22pp));;
  13.      cchhaarr ****aahhoosstt;;
  14.      iinntt iinnppoorrtt;;
  15.      cchhaarr **uusseerr,, **ppaasssswwdd,, **ccmmdd;;
  16.      iinntt **ffdd22pp;;
  17.  
  18. DDEESSCCRRIIPPTTIIOONN
  19.      _R_e_x_e_c looks up the host *_a_h_o_s_t using _g_e_t_h_o_s_t_b_y_n_a_m_e(3N),
  20.      returning -1 if the host does not exist.  Otherwise *_a_h_o_s_t
  21.      is set to the standard name of the host.  If a username and
  22.      password are both specified, then these are used to authen-
  23.      ticate to the foreign host; otherwise the environment and
  24.      then the user's ._n_e_t_r_c file in his home directory are
  25.      searched for appropriate information.  If all this fails,
  26.      the user is prompted for the information.
  27.  
  28.      The port _i_n_p_o_r_t specifies which well-known DARPA Internet
  29.      port to use for the connection; the call
  30.      ``getservbyname("exec", "tcp")'' (see _g_e_t_s_e_r_v_e_n_t(3N)) will
  31.      return a pointer to a structure, which contains the neces-
  32.      sary port.  The protocol for connection is described in
  33.      detail in _r_e_x_e_c_d(8C).
  34.  
  35.      If the connection succeeds, a socket in the Internet domain
  36.      of type SOCK_STREAM is returned to the caller, and given to
  37.      the remote command as ssttddiinn and ssttddoouutt.  If _f_d_2_p is non-
  38.      zero, then an auxiliary channel to a control process will be
  39.      setup, and a descriptor for it will be placed in *_f_d_2_p.  The
  40.      control process will return diagnostic output from the com-
  41.      mand (unit 2) on this channel, and will also accept bytes on
  42.      this channel as being UNIX signal numbers, to be forwarded
  43.      to the process group of the command.  The diagnostic infor-
  44.      mation returned does not include remote authorization
  45.      failure, as the secondary connection is set up after author-
  46.      ization has been verified.  If _f_d_2_p is 0, then the ssttddeerrrr
  47.      (unit 2 of the remote command) will be made the same as the
  48.      ssttddoouutt and no provision is made for sending arbitrary sig-
  49.      nals to the remote process, although you may be able to get
  50.      its attention by using out-of-band data.
  51.  
  52. SSEEEE AALLSSOO
  53.      rcmd(3), rexecd(8C)
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. Sprite v1.0               May 14, 1986                          1
  64.  
  65.  
  66.  
  67.